package com.cn.zy.ehcache.controller;

import com.cn.zy.ehcache.model.User;
import com.cn.zy.ehcache.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author zhangyi
 * @date 2018/12/13 15:26
 */
@RestController
public class UserController {

    @Autowired
    private UserService userService;

    @GetMapping("/list")
    public List<User> getUserList(){
        return userService.getAllUser();
    }
}